﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace thinger.DelegateApp2
{

    public partial class FrmChild : Form
    {
        public FrmChild()
        {
            InitializeComponent();
        }
        public ReceiveDelegate ChildDelegate { get; set; }
        private void btnCreateChild_Click(object sender, EventArgs e)
        {
            string msg = this.txtChildSendMsg.Text;
            ChildDelegate(msg);
        }

        public void ReceiveMsg(string msg)
        {
            this.txtChildReceiveMsg.Text += msg + "\r\n";
        }
    }
}
